# -*- coding: utf-8 -*-
#  @author  Bink
#  @date  2020/9/2 19:31
# @Email : 2641032316@qq.com

import pandas as pd

# pd.set_option('display.max_columns', None)
# pd.set_option('display.max_rows', None)
# pd.set_option('max_colwidth', 100)

file_subsidy = pd.read_excel("out/subsidyInfo.xlsx",
                             dtype=int,
                             delimiter=','
                             )
df_subsidy = pd.DataFrame(file_subsidy)

# print(df_subsidy)

file_score = pd.read_table("D:/pra/Python/python-programming-project/src/resources/train/score_train.txt",
                           dtype=int,
                           delimiter=','
                           )
df_score = pd.DataFrame(file_score)
df_score.columns = ['id', 'departNo', 'ranking']

df_subsidy_score = df_subsidy.merge(df_score).sort_values("subsidy")

df_subsidy_score.to_excel("./out/subsidy_score.xlsx", index=False)
